FROM nginx

ENV RUN_USER nginx
ENV RUN_GROUP nginx

ENV DATA_DIR /data/mfs/www/front
ENV LOG_DIR /data/local/logs/

# 网站源码路径
RUN mkdir /data/mfs/www/front -p
# 日志路径
RUN mkdir /data/local/logs/ -p

# 将所有源码文件放到源码路径中
RUN chown nginx.nginx -R /data/local/logs

ADD ./dist /data/mfs/www/front

# COPY dist/ /usr/share/nginx/html/
# COPY default.conf /etc/nginx/conf.d/default.conf

# 自定义nginx配置处理
ADD deploy/nginx.conf /etc/nginx/nginx.conf
ADD deploy/default.conf /etc/nginx/conf.d/default.conf

EXPOSE 80
ENTRYPOINT nginx -g "daemon off;"
